package com.xyj.week05;

import com.xyj.common.TreeNode;

/**
 * 树的节点数
 */
public class T1 {

    public static int count (TreeNode root) {
        if (root==null){
            return 0;
        }
        return 1+count(root.left)+count(root.right);
    }
}
